Could you please write the steps required to add a new database for media in Sitecore 5.3?
We want to use a separate database to hold images for the site; they will be proxied into the master database.
NOTE: This scenario is applicable to Sitecore 5.3.0 Build 070215, Microsoft SQL Server 2005 and serverMode="File" (web.config connections setting).
Follow the steps below to add a new database to Sitecore 5.3:
Create a database file:
Note: The name “Media” is an example name used further in this article.
To attach the database to Sitecore:
<Media>user id=$(user);password=$(password);Data Source=$(serverName);AttachDBFileName=$(dataFolder)$(prefix)Media_Data.mdf</ Media >
<!-- Media -->
<database id="Media" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel">
<param desc="name">$(id)</param>
<securityEnabled>true</securityEnabled>
<dataProviders hint="list:AddDataProvider">
<dataProvider ref="dataProviders/main" param1="$(id)">
<disableGroup>publishing</disableGroup>
<prefetch hint="raw:AddPrefetch">
<sc.include file="/App_Config/Prefetch/Common.config" />
<sc.include file="/App_Config/Prefetch/Master.config" />
</prefetch>
</dataProvider>
</dataProviders>
<proxiesEnabled>false</proxiesEnabled>
<proxyDataProvider ref="proxyDataProviders/main" param1="$(id)" />
<cacheSizes hint="setting">
<children>100KB</children>
<credentials>100KB</credentials>
<data>20MB</data>
<items>10MB</items>
<parents>100KB</parents>
<paths>500KB</paths>
</cacheSizes>
</database>
Now you can add files to the newly created Media database (see the screenshot below):
Switch to the master database and create a proxy item for the Images folder (see below):
Refer to the Using Proxy Items in Sitecore 5.3 article to learn how to create proxy items.
The proxy item has now been created in the master database (see the screenshot below):
Important Note: For this setup to work, you need to enable proxies in the web database (set the <proxiesEnabled> setting to true). Alternatively, you may set <publishVirtualItems> to true in the master database but in this case the connection between the virtual item and its source will no longer exist.